<% rowbg = 0 %>
<%= nice_form_for(@user_session, :url => user_session_path) do |f| %>
  <%= flash_and_form_errors(@user_session) %>
  <table class="form">
    <tr class="rowbg<%= rowbg = 1 - rowbg %>">
      <td class="name"><%= f.label :login %><%= reqd_sym %></td>
      <td class="value"><%= f.text_field :login %></td>
      <td class="details"></td>
    </tr>
    <tr class="rowbg<%= rowbg = 1 - rowbg %>">
      <td class="name"><%= f.label :password %><%= reqd_sym %></td>
      <td class="value"><%= f.password_field :password %></td>
      <td class="details"></td>
    </tr>
  </table>
  <%= f.submit "Login" %>
  <%= link_to("Forgot Password?", new_password_reset_path) %>
<% end %>
<%= javascript_doc_ready do %>
  $("input#user_session_login").focus();
<% end %>